<?php foreach($model as $data): ?>
<?php
	$like = Like::model()->findByPk($data->id);
?>
    <div class="event-01">
        <div class="event-time border-line border-round">
            <div class="event-time-date"><?php echo date ('d',strtotime($data->date)); ?></div>
            <div class="event-time-month"><?php echo date ('m/Y',strtotime($data->date)); ?></div>
        </div>
        <div class="event-info border-line border-round">
            <div class="event-info-title"><?php echo CHtml::link(CHtml::encode($data->name), array('view', 'id'=>$data->id)); ?></div>
            <div class="event-info-author">Create by: <span><?php echo CHtml::link($data->user->username, array('users/viewprofiles', 'id'=>$data->create_user_id)) ?></span></div>
            <div class="event-info-like"><span><?php echo CHtml::encode($like->like); ?></span><span><?php echo CHtml::encode($like->view); ?></span></div>
            <div class="event-info-category">Category: <span><?php echo CHtml::link(CHtml::encode($data->idType->name), array('event/category', 'type'=>$data->idType->name)); ?></span></div>
            <div class="clear"></div>
            <div class="event-info-time">Start on <span><?php echo date ('H:i',strtotime($data->time)); ?></span></div>
            <div class="event-info-place">At <span><?php echo CHtml::encode($data->place); ?></span></div>
        </div>
        <div class="clear"></div>
    </div><!-- End Event -->
<?php endforeach; ?>